package com.mender.langchain4j.aiservice;

import dev.langchain4j.service.MemoryId;
import dev.langchain4j.service.SystemMessage;
import dev.langchain4j.service.UserMessage;
import dev.langchain4j.service.spring.AiService;
import dev.langchain4j.service.spring.AiServiceWiringMode;
import reactor.core.publisher.Flux;

@AiService(
        wiringMode = AiServiceWiringMode.EXPLICIT,
        chatModel = "openAiChatModel",
        streamingChatModel = "openAiStreamingChatModel",
//        chatMemory = "chatMemory",//配置会话记忆对象
        chatMemoryProvider = "chatMemoryProvider",//配置会话记忆提供者
        contentRetriever = "contentRetriever"//配置向量数据库检索对象
)
public interface ConsultantService {

    @SystemMessage(fromResource = "/static/system.txt")
//    @SystemMessage("你是一个专业的Java开发工程师,名字叫做sg书博，请根据用户的问题给出专业的回答")
    public Flux<String> chat(@MemoryId String memoryId, @UserMessage String message);
}